package com.kingyun.gpsinspection.purificationservice.services.som.innerservice.impl;

import com.kingyun.gpsinspection.purificationservice.dao.mapper.jsm.SystemPlatformMapper;
import com.kingyun.gpsinspection.purificationservice.facade.model.jsm.SystemPlatform;
import com.kingyun.gpsinspection.purificationservice.facade.service.som.SystemPlatformService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * 平台子系统服务实现类
 * Created by yangcs on 2017/3/6.
 */
public class SystemPlatformServiceImpl implements SystemPlatformService {

    @Autowired
    private SystemPlatformMapper systemPlatformMapper;

    /**
     * 查询所有平台子系统，平台默认为五个子系统
     *
     * @return
     */
    @Override
    public List<SystemPlatform> selectSystemPlatform() throws Exception {
        return systemPlatformMapper.selectSystemPlatformList();
    }

    @Override
    public SystemPlatform selectSystemPlatformBySubSystem(String systemCode) throws Exception {
        return systemPlatformMapper.selectSystemPlatform(systemCode);
    }

    /**
     * @param list
     * @Author 卢曼成
     * @Description 批量添加
     * @Date 2017/2/8 17:17
     */
    @Override
    public int insertList(List<SystemPlatform> list) {
        return systemPlatformMapper.insertList(list);
    }

    /**
     * @param list
     * @Author 卢曼成
     * @Description 批量逻辑删除
     * @Date 2017/2/8 17:17
     */
    @Override
    public int deleteList(List<SystemPlatform> list) {
        return systemPlatformMapper.deleteList(list);
    }
}
